package com.knight.proxy;

public class ProxyTarget implements Target{


    private RealTarget realTarget;

    @Override
    public void request() {

        if (realTarget==null) {
            realTarget = new RealTarget();
        }

        System.out.println("before");
        realTarget.request();
        System.out.println("after");
    }
}
